# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Nathan Angelacos <nangel@alpinelinux.org>
pkgname=flashrom
pkgver=1.2
pkgrel=0
pkgdesc="A utility for identifying, reading, writing, verifying and erasing flash chips"
url="https://www.flashrom.org/Flashrom"
arch="all"
license="GPL-2.0-or-later"
depends="dmidecode"
makedepends="pciutils-dev libusb-compat-dev linux-headers"
subpackages="$pkgname-doc"
install="$pkgname.post-install"
options="!check" # no test suite
source="https://download.flashrom.org/releases/flashrom-v$pkgver.tar.bz2
	musl-ffs.patch
	"

builddir="$srcdir"/$pkgname-v$pkgver

build() {
	make PREFIX=/usr/
}

package() {
	make PREFIX="$pkgdir/usr/" install
}

sha512sums="8e01395a54d0d1344bc55e7e4975f43bb8e59ebe83fb5f2766d14f76756d718b487254ce9a19ef4093aed04fb9d40fff5fe8f709b18c512f6e6fad894f83d7b8  flashrom-v1.2.tar.bz2
371131e37ee0f2ce31b5dd264707b91817a2f0a3654943e6b3430df862d4bb64f27117c1c94276cb447f5b45f1771b9997f9c96423d68c6dd4565c1e1f442a5e  musl-ffs.patch"
